﻿<Window 
    x:Class="Application.SceneEditor.Editor"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Name="EditorWindow" ResizeMode="NoResize" Width="1280" Height="720" WindowStartupLocation="CenterOwner" SnapsToDevicePixels="True" Background="{x:Null}" WindowStyle="None" >
	<Window.Resources>
		<Style x:Key="FocusVisual">
			<Setter Property="Control.Template">
				<Setter.Value>
					<ControlTemplate>
						<Rectangle Margin="2" SnapsToDevicePixels="true" StrokeThickness="1" StrokeDashArray="1 2"/>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<SolidColorBrush x:Key="TabItem.Static.Background" Color="#FF2C2C2C"/>
		<SolidColorBrush x:Key="TabItem.Static.Border" Color="#FF181818"/>
		<SolidColorBrush x:Key="TabItem.MouseOver.Background" Color="#FF2C2C2C"/>
		<SolidColorBrush x:Key="TabItem.MouseOver.Border" Color="#FF181818"/>
		<SolidColorBrush x:Key="TabItem.Disabled.Background" Color="#FF2C2C2C"/>
		<SolidColorBrush x:Key="TabItem.Disabled.Border" Color="#FF181818"/>
		<SolidColorBrush x:Key="TabItem.Selected.Border" Color="#FF181818"/>
		<SolidColorBrush x:Key="TabItem.Selected.Background" Color="#FF181818"/>
		<Style x:Key="SceneViewTabStyle" TargetType="{x:Type TabItem}">
			<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
			<Setter Property="Foreground" Value="Black"/>
			<Setter Property="Background" Value="{StaticResource TabItem.Static.Background}"/>
			<Setter Property="BorderBrush" Value="{StaticResource TabItem.Static.Border}"/>
			<Setter Property="Margin" Value="0"/>
			<Setter Property="Padding" Value="6,2,6,2"/>
			<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
			<Setter Property="VerticalContentAlignment" Value="Stretch"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type TabItem}">
						<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
							<Border x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" Background="{TemplateBinding Background}" Margin="0">
								<Border x:Name="innerBorder" BorderThickness="1,1,1,0" Margin="-1" Opacity="0"/>
							</Border>
							<ContentPresenter x:Name="contentPresenter" ContentSource="Header" Focusable="False" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
						</Grid>
						<ControlTemplate.Triggers>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Left"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="Background" TargetName="mainBorder" Value="{StaticResource TabItem.MouseOver.Background}"/>
								<Setter Property="BorderBrush" TargetName="mainBorder" Value="{StaticResource TabItem.MouseOver.Border}"/>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,0,1"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,0,1"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Bottom"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="Background" TargetName="mainBorder" Value="{StaticResource TabItem.MouseOver.Background}"/>
								<Setter Property="BorderBrush" TargetName="mainBorder" Value="{StaticResource TabItem.MouseOver.Border}"/>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="1,0,1,1"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="1,0,1,1"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Right"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="Background" TargetName="mainBorder" Value="{StaticResource TabItem.MouseOver.Background}"/>
								<Setter Property="BorderBrush" TargetName="mainBorder" Value="{StaticResource TabItem.MouseOver.Border}"/>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="0,1,1,1"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,1,1,1"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="Background" TargetName="mainBorder" Value="{StaticResource TabItem.MouseOver.Background}"/>
								<Setter Property="BorderBrush" TargetName="mainBorder" Value="{StaticResource TabItem.MouseOver.Border}"/>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,1,0"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,1,0"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Left"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="Opacity" TargetName="contentPresenter" Value="0.56"/>
								<Setter Property="Background" TargetName="mainBorder" Value="{StaticResource TabItem.Disabled.Background}"/>
								<Setter Property="BorderBrush" TargetName="mainBorder" Value="{StaticResource TabItem.Disabled.Border}"/>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,0,1"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,0,1"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Bottom"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="Opacity" TargetName="contentPresenter" Value="0.56"/>
								<Setter Property="Background" TargetName="mainBorder" Value="{StaticResource TabItem.Disabled.Background}"/>
								<Setter Property="BorderBrush" TargetName="mainBorder" Value="{StaticResource TabItem.Disabled.Border}"/>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="1,0,1,1"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="1,0,1,1"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Right"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="Opacity" TargetName="contentPresenter" Value="0.56"/>
								<Setter Property="Background" TargetName="mainBorder" Value="{StaticResource TabItem.Disabled.Background}"/>
								<Setter Property="BorderBrush" TargetName="mainBorder" Value="{StaticResource TabItem.Disabled.Border}"/>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="0,1,1,1"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,1,1,1"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="Opacity" TargetName="contentPresenter" Value="0.56"/>
								<Setter Property="Background" TargetName="mainBorder" Value="{StaticResource TabItem.Disabled.Background}"/>
								<Setter Property="BorderBrush" TargetName="mainBorder" Value="{StaticResource TabItem.Disabled.Border}"/>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,1,0"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,1,0"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Left"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,0,1"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,0,1"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Left"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="Panel.ZIndex" Value="1"/>
								<Setter Property="Margin" Value="-2,-2,0,-2"/>
								<Setter Property="Opacity" TargetName="innerBorder" Value="1"/>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,0,1"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,0,1"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Bottom"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="1,0,1,1"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="1,0,1,1"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Bottom"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="Panel.ZIndex" Value="1"/>
								<Setter Property="Margin" Value="-2,0,-2,-2"/>
								<Setter Property="Opacity" TargetName="innerBorder" Value="1"/>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="1,0,1,1"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="1,0,1,1"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Right"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="0,1,1,1"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,1,1,1"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Right"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="Panel.ZIndex" Value="1"/>
								<Setter Property="Margin" Value="0,-2,-2,-2"/>
								<Setter Property="Opacity" TargetName="innerBorder" Value="1"/>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="0,1,1,1"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,1,1,1"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,1,0"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,1,0"/>
							</MultiDataTrigger>
							<MultiDataTrigger>
								<MultiDataTrigger.Conditions>
									<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/>
									<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top"/>
								</MultiDataTrigger.Conditions>
								<Setter Property="Panel.ZIndex" Value="1"/>
								<Setter Property="Margin" Value="-2,-2,-2,0"/>
								<Setter Property="Opacity" TargetName="innerBorder" Value="1"/>
								<Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,1,0"/>
								<Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,1,0"/>
							</MultiDataTrigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</Window.Resources>
    
	<Border BorderBrush="Black" BorderThickness="1" Grid.RowSpan="3" Grid.ColumnSpan="3" ClipToBounds="True" SnapsToDevicePixels="True">
		<Grid x:Name="LayoutRoot" Background="#FF2C2C2C" ClipToBounds="True" SnapsToDevicePixels="True">
    		<Grid.RowDefinitions>
    			<RowDefinition Height="20"/>
    			<RowDefinition Height="18"/>
    			<RowDefinition/>
    		</Grid.RowDefinitions>

    		<Grid x:Name="Title_grd" Background="#FF2C2C2C">
    			<Grid.ColumnDefinitions>
    				<ColumnDefinition Width="80*"/>
    				<ColumnDefinition Width="1000*"/>
    				<ColumnDefinition Width="80*"/>
    			</Grid.ColumnDefinitions>
    			<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="Sprite Editor" VerticalAlignment="Center" Grid.Column="1" Foreground="#FFD4D4D4" Margin="0,0,0,1"/>
    			<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
    				<Border BorderBrush="#FFBDBDBD" BorderThickness="0,0,0,1" Height="1" Margin="0,7,8,0" Width="10"/>
    				<Border BorderBrush="#FFBDBDBD" BorderThickness="1,2,1,1" Height="8" Margin="0,2,8,0" Width="12"/>
    				<Label Content="X" Padding="0,2,0,0" Margin="0,0,8,0" Background="{x:Null}" Foreground="#FFBDBDBD"/>
    			</StackPanel>
    		</Grid>

    		<Grid x:Name="Menu_grd" Grid.Row="1" Background="#FF3A3A3A" Margin="6,0">
    			<Menu Margin="0" Grid.Row="1" Background="{x:Null}" Foreground="#FFD4D4D4" Padding="0">
                    <MenuItem Header="File" FontFamily="/SpriteEditor;component/Fonts/#Segoe UI Light">
                        <MenuItem Header="New ..." />
                        <Separator />
                        <MenuItem Header="Open ..." />
                        <MenuItem Header="Open Recent" />
                        <Separator />
                        <MenuItem Header="Save ..." />
                        <MenuItem Header="Save As ..." />
                        <Separator />
                        <MenuItem Header="Quit" />
                    </MenuItem>
                    <MenuItem Header="Edit" FontFamily="/SpriteEditor;component/Fonts/#Segoe UI Light"/>
    				<MenuItem Header="View" FontFamily="/SpriteEditor;component/Fonts/#Segoe UI Light"/>
    				<MenuItem Header="Window" FontFamily="/SpriteEditor;component/Fonts/#Segoe UI Light"/>
    				<MenuItem Header="Help" FontFamily="/SpriteEditor;component/Fonts/#Segoe UI Light"/>
    			</Menu>
    		</Grid>

    		<Grid Grid.Row="3" Margin="6,0,6,6" Background="#FF404040">
    			<Grid.ColumnDefinitions>
    				<ColumnDefinition Width="225"/>
    				<ColumnDefinition/>
    				<ColumnDefinition Width="225"/>
    			</Grid.ColumnDefinitions>
    			<Border BorderBrush="#FF181818" BorderThickness="0,1,0,0" Grid.ColumnSpan="3"/>
                <Grid Margin="4,4,2,4">
                	<TabControl Margin="0" BorderBrush="#FF181818" Background="#FF2C2C2C" Foreground="#FFBDBDBD">
                		<TabItem Header="Scene View" BorderBrush="#FF181818" Background="#FF2C2C2C" Style="{DynamicResource SceneViewTabStyle}" Foreground="#FFBDBDBD">
                			<Grid Background="#FF3A3A3A" Margin="-1">
                				<Button Content="Sprite" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="68" Margin="0" Background="#FF2C2C2C" BorderBrush="#FF181818" Foreground="#FFBDBDBD"/>
                				<Button Content="Sprite Frame" HorizontalAlignment="Center" VerticalAlignment="Bottom" Width="75" Margin="72,0,68,0" Background="#FF2C2C2C" BorderBrush="#FF181818" Foreground="#FFBDBDBD"/>
                				<Button Content="Text" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="64" Margin="0" Background="#FF2C2C2C" BorderBrush="#FF181818" Foreground="#FFBDBDBD"/>
                			</Grid>
                		</TabItem>
                	</TabControl>
                </Grid>
                <ContentPresenter x:Name="RenderPresenter" Grid.Column="1" Margin="2,26,2,4" />
                <Grid Grid.Column="2" Margin="2,4,4,3">
                	<TabControl Margin="0" BorderBrush="#FF181818" Background="#FF2C2C2C" Foreground="#FFBDBDBD">
                		<TabItem Header="Properties" BorderBrush="#FF181818" Background="#FF2C2C2C" Style="{DynamicResource SceneViewTabStyle}" Foreground="#FFBDBDBD">
                			<Grid Background="#FF3A3A3A" Margin="-1">
                				<Button Content="Reset" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="75" Background="#FF2C2C2C" BorderBrush="#FF181818" Foreground="#FFBDBDBD" Margin="0"/>
                			</Grid>
                		</TabItem>
                	</TabControl>
                </Grid>
    		</Grid>
    		<Rectangle Grid.RowSpan="2" Stroke="#FF181818" Grid.Row="1" Margin="5,-1,5,5"/>

            <ResizeGrip HorizontalAlignment="Right" VerticalAlignment="Bottom" Grid.Row="5" Cursor="SizeNWSE" ClipToBounds="True" />

        </Grid>
    </Border>
</Window>
